{% extends 'vcs/base.html' %}

{% block title %}Repository List{% endblock %}

{% block css %}
ul.repository-list li a.repository-link { font-weight: bold; }
{% endblock %}

{% block breadcrumbs %}
<li class="current">repositories</li>
{% endblock %}

{% block content %}

<ul class="repository-list">
    {% for r in repositories %}
    <li><a class="repository-link" href="{{ r.get_absolute_url }}">{{ r }}</a><br />
    {{ r.active_branches.count }} active branch{{ r.active_branches.count|pluralize:"es" }}{% if r.active_branches.count %}:
            {% for b in r.active_branches.all %}
                <a href="{{ b.get_absolute_url }}">{{ b }}</a>
                {% if not forloop.last %}&nbsp;&nbsp;{% endif %}
            {% endfor %}
        {% endif %}
        {% if r.inactive_branches.count %}{{ r.inactive_branches.count }} <a href="#">inactive branch{{ r.inactive_branches.count|pluralize:"es" }}</a>{% endif %}
        <br />
    {% if r.commits.count %}
        {{ r.commits.count }} total commit{{ r.commits.count|pluralize }}
    {% else %}
        No commits yet!
    {% endif %}
    </li>
    {% endfor %}
</ul>

{% endblock %}
